<?php

namespace App;


class Fan extends Model
{
    protected $table = 'fans';

    protected $primaryKey = 'id';

    //关注用户信息
    public function fuser()
    {
        return $this->hasOne('App\User', 'id', 'fan_id');

    }

    //粉丝用户信息
    public function suser()
    {
        return $this->hasOne('App\User', 'id', 'star_id');
    }
}
